package com.yunshan.mp.service.impl;

import com.yunshan.common.utils.DateUtils;
import com.yunshan.mp.domain.MpIndexActivityReview;
import com.yunshan.mp.mapper.MpIndexActivityReviewMapper;
import com.yunshan.mp.service.IMpIndexActivityReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 活动回顾Service业务层处理
 * 
 * @author yunshan
 * @date 2025-01-20
 */
@Service
public class MpIndexActivityReviewServiceImpl implements IMpIndexActivityReviewService 
{
    @Autowired
    private MpIndexActivityReviewMapper mpIndexActivityReviewMapper;

    /**
     * 查询活动回顾
     * 
     * @param id 活动回顾主键
     * @return 活动回顾
     */
    @Override
    public MpIndexActivityReview selectMpIndexActivityReviewById(Long id)
    {
        return mpIndexActivityReviewMapper.selectMpIndexActivityReviewById(id);
    }

    /**
     * 查询活动回顾列表
     * 
     * @param mpIndexActivityReview 活动回顾
     * @return 活动回顾
     */
    @Override
    public List<MpIndexActivityReview> selectMpIndexActivityReviewList(MpIndexActivityReview mpIndexActivityReview)
    {
        return mpIndexActivityReviewMapper.selectMpIndexActivityReviewList(mpIndexActivityReview);
    }

    /**
     * 新增活动回顾
     * 
     * @param mpIndexActivityReview 活动回顾
     * @return 结果
     */
    @Override
    public int insertMpIndexActivityReview(MpIndexActivityReview mpIndexActivityReview)
    {
        mpIndexActivityReview.setCreateTime(DateUtils.getNowDate());
        return mpIndexActivityReviewMapper.insertMpIndexActivityReview(mpIndexActivityReview);
    }

    /**
     * 修改活动回顾
     * 
     * @param mpIndexActivityReview 活动回顾
     * @return 结果
     */
    @Override
    public int updateMpIndexActivityReview(MpIndexActivityReview mpIndexActivityReview)
    {
        mpIndexActivityReview.setUpdateTime(DateUtils.getNowDate());
        return mpIndexActivityReviewMapper.updateMpIndexActivityReview(mpIndexActivityReview);
    }

    /**
     * 批量删除活动回顾
     * 
     * @param ids 需要删除的活动回顾主键
     * @return 结果
     */
    @Override
    public int deleteMpIndexActivityReviewByIds(Long[] ids)
    {
        return mpIndexActivityReviewMapper.deleteMpIndexActivityReviewByIds(ids);
    }

    /**
     * 删除活动回顾信息
     * 
     * @param id 活动回顾主键
     * @return 结果
     */
    @Override
    public int deleteMpIndexActivityReviewById(Long id)
    {
        return mpIndexActivityReviewMapper.deleteMpIndexActivityReviewById(id);
    }

    @Override
    public MpIndexActivityReview selectUniInfo() {
        return mpIndexActivityReviewMapper.selectUniInfo();
    }
}
